<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<style type="text/css">
<!--
.STYLE2 {
	font-size: 13px;
	color: #FFFFFF;
}
.STYLE3 {color: #FFFFFF}
-->

.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	color: #000000;
}
</style>


<table width=95% border="0" align="center" cellspacing = 1 cellpadding = 2 >

  <tr>

	<td bgcolor="#507CD1"  font-size=13px><span class="STYLE2">部门名称</span></td>
	<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">姓名</td>
	<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">分属科室</td>
	<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">IP分机</td>
	<td  bgcolor="#507CD1" font-size=13px><span class="STYLE2">直线电话</td>
	<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">直线虚拟号</td>
	<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">手机</td>
	<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">虚拟网号码</td>
	<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">EMAIL地址</td>
<td bgcolor="#507CD1" font-size=13px><span class="STYLE2">编辑</td>
   
  </tr>


<!-- <table class="table table-bordered table-condensed table-hover tb">
	<tr>
		<td>部门</td>
		<td>姓名</td>
		<td>分属科室</td>
		<td>IP分机</td>
		<td>直线电话</td>
		<td>直线虚拟号</td>
		<td>手机</td>
		<td>虚拟网号码</td>
		<td>邮箱地址</td>
	</tr> -->
	<c:forEach items="${txlList }" var="txl">
	<tr id="${txl.id1 }"  ord= "${txl.ord }">
		<td bordercolor="1" class="style1">${txl.bumen }</td>
		<td bordercolor="1" class="style1">${txl.name }</td>
		<td bordercolor="1" class="style1">${txl.keshi }</td>
		<td bordercolor="1" class="style1">${txl.ip }</td>
		<td bordercolor="1" class="style1">${txl.zhixian }</td>
		<td bordercolor="1" class="style1">${txl.zhixianxuni}</td>
		<td bordercolor="1" class="style1">${txl.mob }</td>
		<td bordercolor="1" class="style1">${txl.xunihao }</td>
		<td bordercolor="1" class="style1">${txl.email }</td>
		<td>
			<input type = "button" value = "编辑"  onclick="revisetxl(this);"  />
			<input type = "button" value = "插入"  onclick="addtxl(this);"  />
			<input type = "button" value = "删除"  onclick="deltxl(this);"  />
		</td>
		<%-- <td><input name="ord" value="${txl.ord }" type="text"/></td> --%>
	</tr>
</c:forEach>
</table>

<script type="text/javascript">

function revisetxl(btn){
	var $row=$($(btn).parents("tr"));
	var id1=$row.attr("id");
	window.location.href="txl_revise?id1="+id1;
}

function addtxl(btn){
	var $row=$($(btn).parents("tr"));
	var ord=$row.attr("ord");
	window.location.href="txl_add?ord="+ord;

}



function deltxl(btn){
	var $row=$($(btn).parents("tr"));
	var id1=$row.attr("id");
	
	
	$.post("delTxl",{
		id1:id1
	},function(data){
		if(data=="success"){
			location.reload();    //刷新页面
		}
	}); 
}
</script>
		
	

